﻿#pragma once
#include <string>
class stations
{
private:
	int station_id; 
	std::string name;
	double distance = 0.0; // 距离参考点的距离，单位：公里
public:
	// 构造函数
	stations() = default;
	stations(int station_id, const std::string& name, double distance = 0.0)
		: station_id(station_id), name(name), distance(distance) {
	}
	// Get方法声明
	int getStationId() const;
	std::string getName() const;
	double getDistance() const { return distance; }
	// Set方法声明
	void setStationId(int id);
	void setName(const std::string& name);
	void setDistance(double d) { distance = d; }
};

